{% load mptt_tags %}

<li class="dropdown">
  <a href="#">Категории</a>
  <ul class="dropdown__menu">
    {% recursetree list_category %}
      <li>
        <a href="{% url 'post_list' node.slug %}">{{ node.name }}</a>
        {% if not node.is_leaf_node %}
          <ul class="children">
            {{ children }}
          </ul>
        {% endif %}
      </li>
    {% endrecursetree %}
  </ul>
</li>
